package adapter;

/**
 * @author: Alexander Martyushov
 */
public class DuckTestDrive {

    public static void main(String[] args){

        MallardDuck duck = new MallardDuck();
        WildTurkey turkey = new WildTurkey();

        Duck turkeyAdapter = new TurkeyAdapter(turkey);
        Turkey duckAdapter = new DuckAdapter(duck);

        System.out.println("The turkey says...");
        turkey.gobble();
        turkey.fly();

        System.out.println("\n The Duck says...");
        testDuck(duck);
        System.out.println("The turkey says...");
        turkey.gobble();
        turkey.fly();

        System.out.println("\n The TurkeyAdapter says...");
        testDuck(turkeyAdapter);



        System.out.println("The  says...");
        duckAdapter.gobble();
        duckAdapter.fly();



    }

    static void testDuck(Duck duck){
        duck.quak();
        duck.fly();
    }
}
